<!DOCTYPE html>
<head>
    <title>

    </title>
    @include('web.layout.head')
    <link rel="stylesheet" href="{{asset('/css/web/product/product.css')}}">
    <link rel="stylesheet" href="{{asset('/css/web/inc/public_goods_details.css')}}">
    <script src="{{asset('/js/web/product/scroole.min.js')}}"></script>
    <script src="{{asset('/js/web/product/jquery.SuperSlide.2.1.1.js')}}"></script>
    <script src="{{asset('/js/web/product/imgshow.js')}}"></script>
    <script src="{{asset('/js/web/product/share.js')}}"></script>
    <script src="{{asset('/js/web/product/jquery.jqzoom.js')}}"></script>
    <style>
        .page a {
            border: none !important;
            padding: 0 !important;
        }
    </style>
    <script type="text/javascript">
    var province_name = "<?php echo !empty($province_name)?$province_name:""; ?>";
    var city_name = "<?php echo !empty($city_name)?$city_name:""; ?>";
        $(function () {
            // 商品数量选择脚本
            var buy_limit = 0;
            var buy_num_msg = '超出库存！';
            // 商品为促销商品则设置购买数量限制为1
            $("#add-btn").click(function () {
                var n = parseInt($("#num-inp").val());//购物件数
                var s = buy_limit == 0 ? parseInt($("#inven-num").html()) : buy_limit;
                $price = $(".word_price").html();
                if(!$price){
               	 $price = $(".priceinfo").html();
                }
                if (n >= s) {
                    $("#num-inp").val(s);
                    $('.in_num').html(s +'件');
                    //$.MsgBox.Alert("温馨提示", buy_num_msg);
                    $('.in_price').html('￥' + (new Number($price.replace("￥","")*s).toFixed(2))+'元');
                } else {
                    $("#num-inp").val(n + 1);
                    $('.in_num').html(n + 1 +'件');
                    $('.in_price').html('￥' + (new Number($price.replace("￥","")*(n+1)).toFixed(2))+'元');
                }
                _freight();//运费
            })
            $("#cut-btn").click(function () {
                var n = parseInt($("#num-inp").val());
                var s = buy_limit == 0 ? parseInt($("#inven-num").html()) : buy_limit;
                if (s > 0) {
                	  $price = $(".word_price").html();
                      if(!$price){
                     	 $price = $(".priceinfo").html();
                      }
                    if (n > 1) {
                        $("#num-inp").val(n - 1);
                        $('.in_num').html(n - 1 +'件');
                        $('.in_price').html('￥' + (new Number($price.replace("￥","")*(n - 1)).toFixed(2))+'元');
                    } else {
                        $("#num-inp").val(1);
                        $('.in_num').html(1 +'件');
                        $('.in_price').html('￥' + (new Number($price.replace("￥","")*1).toFixed(2))+'元');
                    }
                } else {
                	 $price = $(".word_price").html();
                     if(!$price){
                    	 $price = $(".priceinfo").html();
                     }
                    if (n > 0) {
                        $("#num-inp").val(n - 1);
                        $('.in_num').html(n - 1 +'件');
                        $('.in_price').html('￥' + (new Number($price.replace("￥","")*(n - 1)).toFixed(2))+'元');
                    } else {
                        $("#num-inp").val(0);
                        $('.in_num').html(0 +'件');
                        $('.in_price').html('￥' + (new Number($price.replace("￥","")*0).toFixed(2))+'元');
                    }
                }
                _freight();//运费
            })
            $("#num-inp").keyup(function () {
                var n = parseInt($("#num-inp").val());
                var s = buy_limit == 0 ? parseInt($("#inven-num").html()) : buy_limit;
                if (n > s) {
                    alert(buy_num_msg)
                    //$.MsgBox.Alert("温馨提示", buy_num_msg);
                    $("#num-inp").val(s);
                    $('.in_num').html(s +'件');
                    return false;
                } else {
                	 $price = $(".word_price").html();
                     if(!$price){
                    	 $price = $(".priceinfo").html();
                     }
                    if (s > 0) {
                        if (n > 1) {
                            $("#num-inp").val(n);

                            $('.in_num').html(n +'件');
                            $('.in_price').html('￥' + (new Number($price.replace("￥","")*n).toFixed(2))+'元');
                        } else {
                            $("#num-inp").val(1);
                            $('.in_num').html(1 +'件');
                            $('.in_price').html('￥' + (new Number($price.replace("￥","")*1).toFixed(2))+'元');
                        }
                    } else {
                        if (n > 0) {
                            $("#num-inp").val(n);
                            $('.in_num').html(n +'件');
                            $('.in_price').html('￥' + (new Number($price.replace("￥","")*n).toFixed(2))+'元');
                        } else {
                            $("#num-inp").val(0);
                            $('.in_num').html(0 +'件');
                            $('.in_price').html('￥' + (new Number($price.replace("￥","")*0).toFixed(2))+'元');
                        }
                    }
                }
                _freight();//运费
            });
        })
    </script>

</head>

<body class="por body-info">
@include('web.layout.product_head')
<!-- 文件上传配置 -->

<div class="w1200 pro-info">
    <div class="crumbs">
        <a href="/" class="home">首页</a>　>　
        <a href="{{asset('/product/product_classify')}}">所有商品</a>　>　
        <a href="{{asset('/product/product_classify/')}}">12</a>　>　
        <a href="{{asset('/product/product_list/')}}">333</a>　>
        333</div>
    <div class="w-f f-cb fir-wrap">
        <div class="fl pro-img">
            <div class="imgbig jqzoom">
                <img id="probig" jqimg="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/2017/05/17/14949870357241hbqc7.jpg" width="350" height="350" src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/2017/05/17/14949870357241hbqc7.jpg" alt="海康威视 DS-7924HGH-SH">
            </div>
            <div class="imglist">
                <div class="list">
                    <ul>
                        <li class="active"><img data-img="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/2017/05/17/14949870357241hbqc7.jpg" alt="海康威视 DS-7924HGH-SH" src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/2017/05/17/14949870357241hbqc7.jpg" data-big="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/2017/05/17/14949870357241hbqc7.jpg"></li>
                        <li><img data-img="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/2017/05/17/14949870357241hbqc7.jpg" alt="海康威视 DS-7924HGH-SH" src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/2017/05/17/14949870357241hbqc7.jpg" data-big="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/2017/05/17/14949870357241hbqc7.jpg"></li>
                        <li><img data-img="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/2017/05/17/14949870357241hbqc7.jpg" alt="海康威视 DS-7924HGH-SH" src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/2017/05/17/14949870357241hbqc7.jpg" data-big="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/2017/05/17/14949870357241hbqc7.jpg"></li>
                    </ul>
                </div>
            </div>
            <div class="bot-box bdsharebuttonbox f-cb bdshare-button-style0-16" data-bd-bind="1520927732385">
                <span class="ser fl">商品编号：<span id="sku_code">V10206A0202000035</span></span>
                <br/>
                <a href="javascript:;" class=" more bds_more" data-cmd="more">分享</a>
                <a href="javascript:;" id="atten" class="atten">  关注 </a>
                <a href="javascript:;" id="star" class="star collection_shop">  收藏店铺 </a>
            </div>
        </div>
        <div class="cent-wrap fl">
            <h3>海康威视 DS-7924HGH-SH</h3>
            <h1 hidden>海康威视 DS-7924HGH-SH</h1>

            <div class="pro-price f-cb">
                <div id="ajax_price" class="fl left" style="position: relative">
                    <div class="original_price"><span>原价</span><font class="priceinfo s-pri">￥220.00</font></div>
                    <div class="price"><span>促销价</span><font class="s-priceinfo pri fl sales">￥180.00</font></div>
                </div>
                <div class="fr trade-num">
                    <p>交易成功</p>
                    <p class="num">111</p>
                </div>
                <div class="fr eva-num">
                    <p>累积评价</p>
                    <p class="num">0</p>
                </div>

            </div>
            <div class="tips f-cb">
                <div class="delivery fl"><span class="send">配送：</span><span class="start">浙江省杭州</span><i
                            class="end">至</i> @include('web.layout.freightcity')</div>
                <div class="cost fl">运费：<span class="money">包邮</span><span class="freight_hint"></span></div>
            </div>
            <div class="standard" id="attribute">
                <div class="row f-cb field">
                    <span class="fl stt" data-id="19">路数 ：</span>
                    <div class="fl list-lab">
                        <span data-name="19-99" class="click sx19-99 hover">24</span> <!--hover-->
                    </div>
                </div>
                <div class="row f-cb field">
                    <span class="fl stt" data-id="20">盘位 ：</span>
                    <div class="fl list-lab">
                            <span data-name="20-103" class="click sx20-103 hover">4</span> <!--hover-->
                    </div>
                </div>
                <div class="row f-cb field">
                    <span class="fl stt" data-id="21">最大支持硬盘容量 ：</span>
                    <div class="fl list-lab">
                            <span data-name="21-106" class="click sx21-106 hover">1T</span> <!--hover-->
                    </div>
                </div>
                <div class="row f-cb field">
                    <span class="fl stt" data-id="22">规格 ：</span>
                    <div class="fl list-lab">
                            <span data-name="22-114" class="click sx22-114 hover">1.5U</span> <!--hover-->
                    </div>
                </div>
                <div class="row f-cb field">
                    <span class="fl stt" data-id="23">接口 ：</span>
                    <div class="fl list-lab">
                            <span data-name="23-126" class="click sx23-126 hover">1080P混合录像机</span> <!--hover-->
                    </div>
                </div>
                <input type="hidden" name="attribute" value="5516">
                <input type="hidden" name="_token" value="koJIMjHttHtIa1XXCKj7F5JZbGBdctnecwaBnRpg">
                {{ csrf_field() }}
            </div>
            <div class="num-msg f-cb">
                <span class="fl numc">采购数量：</span>
                <div class="numbox fl f-cb">
                    <a href="javascript:;" class="jian fl" id="cut-btn">-</a>
                    <input name="num" id="num-inp" class="fl num" type="text" value="1">
                    <a href="javascript:;" class="jia fl" id="add-btn">+</a>
                </div>
                <span class="fl inven">
                    (库存<span id="inven-num" data-promotion-num="{{isset($info['promotion_product'])? $info['promotion_product']['promotion_num'] : 9999}}">100</span>件)
                    </span>
            </div>

            <div class="shop-btn f-cb purchase">
                <a href="javascript:;" company-id="<?php echo isset($info['user_id']['company_id'])?$info['user_id']['company_id']:1; ?>" class="add-car fl">加入进货单</a>
                <a href="javascript:;" class="buy fl">立即购买</a>
            </div>
            <div class="shop-btn f-cb halt" hidden>
                <span style="font-size: 18px;color:gray;">该商品已售罄！</span>
            </div>
        </div>


         <div class="new-right-brand fr">
            <span class="img"><img src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/image/2687ad1b0e5da4294e6a6be0b8badfbf.png" alt=""></span>
            <h2>碧投旗舰店碧投旗舰店碧投旗舰店</h2>
            <div class="txt">联系卖家：李老四</div>
            <div class="txt">店铺等级：
                <img src="{{asset('/img/web/product/grade_img01.png')}}">
                <img src="{{asset('/img/web/product/grade_img01.png')}}">
                <img src="{{asset('/img/web/product/grade_img01.png')}}">
                <img src="{{asset('/img/web/product/grade_img01.png')}}">
            </div>
            <div class="txt">经营模式：生产厂家</div>
            <div class="txt">所在地区：浙江杭州</div>
            <div class="xian"></div>
            <div class="quality text-left">
                <span>描述</span>
                <font class="red">4.9↓</font>
            </div>
            <div class="quality text-center">
                <span>服务</span>
                <font class="red">4.9-</font>
            </div>
            <div class="quality  text-right">
                <span>物流</span>
                <font class="green">4.9↑</font>
            </div>
            <a class="fl btn_store">进入店铺</a>
            <a class="fr collect_store collection_shop">收藏店铺</a>
        </div>
    </div>
    <div class="pro-info-wrap f-cb w-f">
        <div class="fl left-wrap">
            <div class="text_left">
                <h4>猜你喜欢</h4>
            </div>
            <div class="main-box left-hotlist">

                <ul>
                                                                        <li>

                                <a href="http://www.ejing365.com/product/info/13645/7791" class="img bigbox"><img src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/image/04419436980cd65a7bc4ae75608dfaac.jpeg" alt=""></a>
                                <div class=" cont">
                                    <span class="pri">￥1,534.00</span>
                                    <a href="http://www.ejing365.com/product/info/13645/7791" class="name">同为 TD-2716TE-PR TE系列模拟录像机</a>
                                </div>
                            </li>
                                                    <li>

                                <a href="http://www.ejing365.com/product/info/13644/7790" class="img bigbox"><img src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/image/4d9eedea4b9f2096f052b32308c8ade3.jpeg" alt=""></a>
                                <div class=" cont">
                                    <span class="pri">￥910.00</span>
                                    <a href="http://www.ejing365.com/product/info/13644/7790" class="name">同为 TD-2708TE-PR TE系列模拟录像机</a>
                                </div>
                            </li>
                                                    <li>

                                <a href="http://www.ejing365.com/product/info/13643/7789" class="img bigbox"><img src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/image/d1a1da245e6641355d3e0e117fda2e65.jpeg" alt=""></a>
                                <div class=" cont">
                                    <span class="pri">￥733.00</span>
                                    <a href="http://www.ejing365.com/product/info/13643/7789" class="name">同为 TD-2116TS-C TS系列模拟录像机</a>
                                </div>
                            </li>
                                                    <li>

                                <a href="http://www.ejing365.com/product/info/13642/7788" class="img bigbox"><img src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/image/42446240ef2aae4f8a04eaec7c83b10c.jpeg" alt=""></a>
                                <div class=" cont">
                                    <span class="pri">￥452.00</span>
                                    <a href="http://www.ejing365.com/product/info/13642/7788" class="name">同为 TD-2108TS-C TS系列模拟录像机</a>
                                </div>
                            </li>
                                                    <li>

                                <a href="http://www.ejing365.com/product/info/13641/7787" class="img bigbox"><img src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/image/048883269f07c84aabd2c0a5b85ba6d6.jpeg" alt=""></a>
                                <div class=" cont">
                                    <span class="pri">￥293.00</span>
                                    <a href="http://www.ejing365.com/product/info/13641/7787" class="name">同为 TD-2104TS-C TS系列模拟录像机</a>
                                </div>
                            </li>
                                                    <li>

                                <a href="http://www.ejing365.com/product/info/13640/7786" class="img bigbox"><img src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/image/edf1573af53c901a35adc457841ddef8.jpeg" alt=""></a>
                                <div class=" cont">
                                    <span class="pri">￥513.00</span>
                                    <a href="http://www.ejing365.com/product/info/13640/7786" class="name">同为 TD-2116TS-CL TS系列模拟录像机</a>
                                </div>
                            </li>
                                                    <li>

                                <a href="http://www.ejing365.com/product/info/13639/7785" class="img bigbox"><img src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/image/4518d157f007c4827c4b665bec222793.jpeg" alt=""></a>
                                <div class=" cont">
                                    <span class="pri">￥305.00</span>
                                    <a href="http://www.ejing365.com/product/info/13639/7785" class="name">同为 TD-2108TS-CL TS系列模拟录像机</a>
                                </div>
                            </li>
                                                    <li>

                                <a href="http://www.ejing365.com/product/info/13638/7784" class="img bigbox"><img src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/image/5e96442756ecf0b4de0456141e444ae7.jpeg" alt=""></a>
                                <div class=" cont">
                                    <span class="pri">￥254.00</span>
                                    <a href="http://www.ejing365.com/product/info/13638/7784" class="name">同为 TD-2104TS-CL TS系列模拟录像机</a>
                                </div>
                            </li>

                                    </ul>
            </div>
        </div>
        <div class="fr right-wrap">
            <div class="top-wrap">
                <div id="infonav" class="navbox f-cb">
                    <ul class="fl">
                        <li class="hover"><a href="#goodsdetail">商品详情</a></li>
                        <li><a href="#parameter">规格参数</a></li>
                        <li><a href="#userspingj">用户评价<span class="oran">(0)</span></a>
                        </li>
                        <li><a href="#caigou">采购说明</a></li>
                        <li><a href="#shouhou">售后保障</a></li>
                    </ul>
                </div>
                <div class="p-parameter f-cb">
                    <ul>
                        <li><span>商品品牌：</span>海康威视</li>
                        <li title="DS-2CD2135F(D)-I(W)(S)"><span>商品型号：</span>DS-7924HGH-SH </li>
                    <!-- <li><span>商品编号：DS-7924HGH-SH </span> </li> -->
                        <li title="海康威视 DS-7924HGH-SH"><span>产品类型： </span>模拟录像机</li>
                        <li><span>质保年限： </span> 1年</li>
                        <li><span>商品产地：</span>杭州                        </li>

                    </ul>
                </div>
            </div>
            <div class="cent-info-main">
                <div class="boxs img-intr" id="goodsdetail" style="padding-top: 40px; display: block;">
                    <p style="text-align: center;"><img title="1494987012210624b9xF.jpg" src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/at/image/20170517/1494987012210624b9xF.jpg"></p><p style="text-align: center;"><img title="1494987012210624ufyR.jpg" src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/at/image/20170517/1494987012210624ufyR.jpg"></p><p style="text-align: center;"><img title="1494987012210624AMnm.jpg" src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/at/image/20170517/1494987012210624AMnm.jpg"></p><p style="text-align: center;"><img title="1494987013120390BbQ0.jpg" src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/at/image/20170517/1494987013120390BbQ0.jpg"></p><p style="text-align: center;"><img title="1494987013120390x2yk.jpg" src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/at/image/20170517/1494987013120390x2yk.jpg"></p><p style="text-align: center;"><img title="1494987013120390NA3q.jpg" src="http://ejing-files-uploads.oss-cn-hangzhou.aliyuncs.com/upload/at/image/20170517/1494987013120390NA3q.jpg"></p><p><br></p>
                </div>
                <div class="boxs parameter-wrap" id="parameter">
                    规格参数
                </div>

                <div class="boxs evalu-wrap" id="userspingj" style="padding-top: 40px;">
                    <div class="top-graded f-cb">
                        <div class="fl left-grade">
                            <span class="big-gra fl"><i>1</i>分</span>
                            <div class="fl sche">
                                <div class="sch-box">
                                    <ul>
                                        <li>非常不满意</li>
                                        <li>不满意</li>
                                        <li>一般</li>
                                        <li>满意</li>
                                        <li>非常满意</li>
                                    </ul>
                                    <span class="s-sch01" style="right: 0%;" id="aquare"><span id="totalfen">5.0</span><span>分</span></span>
                                </div>
                                <p>共<span class="red">11112</span>位购买者参与评分</p>
                            </div>
                        </div>
                    </div>
                    <div class="evalu-list">
                        <div class="top-screen f-cb">
                            <label class="lab fl">
                                <input checked="" value="" name="type" class="fl rad typesec" type="radio">
                                <span class="fl">全部</span>
                            </label>
                            <label class="lab fl">
                                <input value="good" name="type" class="fl rad typesec" type="radio">
                                <span class="fl">好评<span class="s-num"></span></span>
                            </label>
                            <label class="lab fl">
                                <input value="medium" name="type" class="fl rad typesec" type="radio">
                                <span class="fl">中评<span class="s-num"></span></span>
                            </label>
                            <label class="lab fl">
                                <input value="bad" name="type" class="fl rad typesec" type="radio">
                                <span class="fl">差评<span class="s-num"></span></span>
                            </label>
                        </div>
                        <div id="comment_list" class="list">
                            <!-- include('product.comments',['data' => $comment_list['data'],'page' => $comment_list['page']]) -->
                        </div>

                    </div>
                </div>
                <div class="boxs packing" id="caigou" style="padding-top: 40px;">
                    采购说明

                </div>
                <div class="boxs packing" id="shouhou" style="padding-top: 40px;">
                    售后保证

                </div>

            </div>

            <div class="pledge">
                <ul>
                    <li class="li-fir">
                        <h4>正品行货</h4>
                        <p>e井在线服务平台向您保证所售商品均为正品行货，可联系商家开具发票。</p>
                    </li>
                    <li class="li-sec">
                        <h4>全国联保</h4>
                        <p>可凭借质保证书及发票在全国就近售后维修网点享受维修或升级服务。</p>
                    </li>
                </ul>
            </div>
            <div class="state-copy">
                <b class="tt">权利声明：</b>
                <p>e井在线服务平台上的所有商品信息、客户评价、商品咨询、网友讨论等内容，是e井在线服务平台重要的经营资源，未经许可，禁止非法转载使用。</p>
                <p><span class="bold">注：</span>e井在线服务平台为第三方交易平台及信息服务提供者，所展示的商品/服务的标题、价格、详情等信息内容系由店铺经营者发布，其真实性、准确性和合法性均由店铺经营者负责，用户在购买商品/服务前注意谨慎核实。如用户对商品/服务的标题、价格、详情等任何信息有任何疑问的，请在购买前与店铺经营者沟通确认；如用户发现店铺内有任何违法/侵权信息，请立即向平台举报并提供有效线索。感谢您的理解与支持！</p>
            </div>

        </div>
    </div>
</div>


<div class="alert-prompt">
    <div class="titbox f-cb">
        <span class="fl tt">提示</span>
        <span class="fr close"></span>
    </div>
    <div class="contwrap w-f">
        <div class="centbox">
            <div class="success f-cb">
                <span class="ico fl"></span>
                <div class="fl">
                    <p class="f20">您已成功收藏该店铺！</p>
                    <a target="_blank" href="{{asset('/member/buyer/collection?type=2')}}">查看我的收藏店铺></a>
                </div>
            </div>
        </div>
    </div>
</div>
<div class="bg-alert"></div>
<!-- login-content -->
<!-- <form action="/register/login" method="post" accept-charset="utf-8" class="form-horizontal"
      onsubmit="javascript:return false;" id="frm-post-login" name="frm-post">
    <div style="display:none">
        <input type="hidden" name="_scfs" value="f233ff8638c6109bc19e4c2658432c94"/>
    </div>
    <div class="info-obox ol popup" style="display: none">
        <div class="hd"><a href="javascript:;" id="mb_close" class="close fr"></a>您尚未登录</div>
        <div class="login-wrap box">
            <div class="titbox f-cb">
                <h3 class="fl">账户登录</h3>
                <a href="/login/register" class="fr">免费注册</a>
            </div>
            <div class="inp-box user">
                <input name='uname' class="tex" id="uname" type="text" placeholder="输入用户名/手机号码">
            </div>
            <div class="inp-box pass">
                <input name='pwd' class="tex" type="password" placeholder="输入用户密码">
            </div>
            <div class="bot-link f-cb">
                <a href="/login/forget " class="fr">忘记密码？</a>
            </div>
            <input class="sub-btn" type="submit" value="登　　录">
        </div>
    </div>
</form> -->
<div class="info-obox hl popup tianjia" style="display: none">
    <div class="hd"><a href="javascript:;" id="mb_close" class="close fr"></a></div>
    <div class="content">
        <div class="tips">添加商品成功！</div>
        <div class="btns f-cb">
            <a href="javascript:;" class="fl continue">继续购物</a>
            <a href="{{asset('/order/cart')}} " class="fr">去结算</a>
        </div>
    </div>

</div>
<div class="mask2"></div>
<form action="{{asset('/order/submit_cart')}}" method="post" accept-charset="utf-8" id="form-post" name="form-post">
    {{csrf_field()}}
    <input name="sku_id" id="sku_id" type="text" hidden>
    <input type="hidden" name="product_type" value="direct_cart"/>
    <input name="num" id="num" type="text" hidden>
</form>

@include('web.layout.footer_ware')
<script src="{{asset('/control/msgbox/jquery.msgbox.js')}}"></script>
<script>
    @if(time() < 12111)
    var distance_time = $('.product_activity_box').data('time-interval');

    function GetRTime_zk() {
        distance_time -= 1;
        var d = 0;
        var h = 0;
        var m = 0;
        var s = 0;
        if (distance_time >= 0) {
            d = Math.floor(distance_time / 60 / 60 / 24);
            h = Math.floor(distance_time / 60 / 60 % 24);
            m = Math.floor(distance_time / 60 % 60);
            s = Math.floor(distance_time % 60);
        }
        document.getElementById("t_d_zk").innerHTML = d + "天";
        document.getElementById("t_h_zk").innerHTML = h + "时";
        document.getElementById("t_m_zk").innerHTML = m + "分";
        document.getElementById("t_s_zk").innerHTML = s + "秒";
    }

    setInterval("GetRTime_zk()", 1000);
    @endif

    $(function () {
        // var con=$.MsgBox;
        function escape2Html(str) {
            var arrEntities = {'lt': '<', 'gt': '>', 'nbsp': ' ', 'amp': '&', 'quot': '"'};
            return str.replace(/&(lt|gt|nbsp|amp|quot);/ig, function (all, t) {
                return arrEntities[t];
            });
        }


        $price = $(".word_price").html();
        if(!$price){
       	 $price = $(".priceinfo").html();
        }

        $('.in_price').html('￥' + (new Number($price.replace("￥","").replace(",","")).toFixed(2)));

        //规格参数处理
        var attrcontent ={"5516":{"price":"2050.00","discount":null,"attributes":{"19":{"val":"2114","val_id":"99","attr_id":"19","attr_name":"路数"},"20":{"val":"4","val_id":"103","attr_id":"20","attr_name":"盘位"},"21":{"val":"1T","val_id":"106","attr_id":"21","attr_name":"最大支持硬盘容量"},"22":{"val":"1.5U","val_id":"114","attr_id":"22","attr_name":"规格"},"23":{"val":"1080P混合录像机","val_id":"126","attr_id":"23","attr_name":"接口"}},"stock":323,"product_id":9378,"auth_price":"1825.00","sku_code":"V10206A0202000035","sku_id":5516}}

        var sku_id = 5516;
        $.each(attrcontent[sku_id]['attributes'], function (index, ele) {
            $('.standard span.sx' + ele['attr_id'] + '-' + ele['val_id']).addClass("hover");
        })
        $('.pro-price .s-pri').html('￥' + (new Number(attrcontent[sku_id]['price']).toFixed(2)));
        $('.pro-price .pri').html('￥' + (new Number(attrcontent[sku_id]['auth_price']).toFixed(2)));
        if($('#inven-num').data('promotion-num') < attrcontent[sku_id]['stock']  && $('#inven-num').data('promotion-num') != 0){
            $('#inven-num').html($('#inven-num').data('promotion-num'));
        }else{
            $('#inven-num').html(attrcontent[sku_id]['stock']);
        }
        $('input[name="attribute"]').val(attrcontent[sku_id]['sku_id']);
        $('#sku_code').html(attrcontent[sku_id]['sku_code']);
        if (attrcontent[sku_id]['stock'] <= 0) {
            $(".halt").show();
            $(".purchase").hide();
        }


        function montage() {
            var val = "";
            $(".pro-info .cent-wrap .standard .row").each(function () {
                for (attr in attrcontent) {
                    var sku_id = parseInt('{ { $ sku_id }}');
                    var sku_id = 5516;
                    $.each(attrcontent[sku_id]['attributes'], function (index, ele) {
                        $('.standard span.sx' + ele['attr_id'] + '-' + ele['val_id']).addClass("hover");
                    })
                    $('.pro-price .s-pri').html('￥' + (new Number(attrcontent[sku_id]['price']).toFixed(2)));
                    $('.pro-price .pri').html('￥' + (new Number(attrcontent[sku_id]['auth_price']).toFixed(2)));
                    if ($('#inven-num').data('promotion-num') < attrcontent[sku_id]['stock'] && $('#inven-num').data('promotion-num') != 0) {
                        $('#inven-num').html($('#inven-num').data('promotion-num'));
                    } else {
                        $('#inven-num').html(attrcontent[sku_id]['stock']);
                    }
                    $('input[name="attribute"]').val(attrcontent[sku_id]['sku_id']);
                    $('#sku_code').html(attrcontent[sku_id]['sku_code']);
                    if (attrcontent[sku_id]['stock'] <= 0) {
                        $(".halt").show();
                        $(".purchase").hide();
                    }
                }
            })
        }

                    function montage() {
                        var val = "";
                        $(".pro-info .cent-wrap .standard .row").each(function () {

                            if ($(this).children('.list-lab').children('span').hasClass('hover')) {
                                val += $(this).children('.list-lab').children('span.hover').data("name") + ",";
                            } else {
                                val += '0-0' + ",";
                            }

                        });
                        return val;
                    }

                    function checkNature(vget) {

                        var arrvalue = $.grep(vget.split(","), function (n) {
                            return $.trim(n).length > 0;
                        });

                        var attjson = [];
                        $.each(attrcontent, function (index, ele) {
                            var vavue = '';

                            $.each(ele['attributes'], function (index2, ele2) {
                                vavue += ele2['attr_id'] + '-' + ele2['val_id'] + ',';
                            })
                            if (vget == vavue) {
                                attjson = [{
                                    "auth_price": attrcontent[index]['auth_price'],
                                    "price": attrcontent[index]['price'],
                                    "sku_id": attrcontent[index]['sku_id'],
                                    "stock": attrcontent[index]['stock'],
                                    "sku_code": attrcontent[index]['sku_code'],
                                }];

                                return false;
                            }

                        })

                        return attjson;
                    }


                    $('.standard').delegate('.click', 'click', function () {
                        if (!$(this).hasClass('hover')) {
                            $(this).addClass('hover').siblings('span').removeClass('hover');
                        } else {
                            $(this).removeClass('hover');
                        }
                        var natureGroup = montage();
                        var checkNull = checkNature(natureGroup);
                        if (checkNull != '') {
                            location.href = '/product/info/9378/5516';
                        } else {
                            $('.pro-price .s-pri').html('￥' + 0 + '.00');
                            $('.pro-price .pri').html('￥' + 0 + '.00');
                            $('#inven-num').html(0);
                            $('input[name="attribute"]').val(0);
                            $('#sku_code').html('');
                            $('.in_price').html('￥' + 0 + '.00');
                        }


                        var html = '';
                        $('.click').each(function (index, el) {
                            if ($(this).hasClass('hover')) {
                                html = html + '<font>' + $(this).text() + '</font>';
                            }
                        });
                        $('.skues').html(html);

                        var innum = $('#inven-num').html() * 1;
                        if (innum < 1) {
                            $(".halt").show();
                            $(".purchase").hide();
                        } else {
                            $(".halt").hide();
                            $(".purchase").show();
                        }


                    })


                    $('.standard').delegate('.click', 'click', function () {
                        if (!$(this).hasClass('hover')) {
                            $(this).addClass('hover').siblings('span').removeClass('hover');
                        } else {
                            $(this).removeClass('hover');
                        }
                        var natureGroup = montage();
                        var checkNull = checkNature(natureGroup);
                        if (checkNull != '') {
                            location.href = '/product/info/9378/5516';
                        } else {
                            $('.pro-price .s-pri').html('￥' + 0 + '.00');
                            $('.pro-price .pri').html('￥' + 0 + '.00');
                            $('#inven-num').html(0);
                            $('input[name="attribute"]').val(0);
                            $('#sku_code').html('');
                            $('.in_price').html('￥' + 0 + '.00');
                        }
                        var html = '';
                        $('.click').each(function (index, el) {
                            if ($(this).hasClass('hover')) {
                                html = html + '<font>' + $(this).text() + '</font>';
                            }
                        });
                        $('.skues').html(html);

                    })


                    // 加入进货单
                    var jud = '{{ Session::get("userid")}}';
                    $(".add-car").click(function () {
                        var pid = '{ {$ info["product_id"]}}';
                        var pid = 9378;
                        var num = $("#num-inp").val();
                        var attribute = $("[name='attribute']").val();
                        var token = $('input[name="_token"]').val();
                        var company_id = $(this).attr('company-id');
                        if (attribute == 0) {
                            layer.alert('商品属性不正确，请重新选择');
                            return false;
                        }
                        $.ajax({
                            url: AJAX_URL + '/product/addcar',
                            type: 'GET',
                            dataType: 'json',
                            data: {
                                product_id: pid,
                                num: num,
                                shop_id: company_id,
                                sku_id: attribute,
                                type: 'car',
                                _token: token
                            },
                            success: function (data) {
                                if (data.code == 0) {
                                    $(".tianjia,.mask2").show();
                                } else if (data.code == 900) {
                                    layer.confirm('请先登录后再关注商品，点击【确认】跳转到登录页面', {
                                        title: '温馨提示',
                                        btn: ['确认', '取消'] //可以无限个按钮
                                    }, function (index) {
                                       window.location.href = AJAX_URL + '/user/login';
                                    }, function (index, layero) {
                                        layer.close(index);
                                    });
                                } else {
                                    layer.alert(data.message);
                                }
                            }
                        })
                    });
                    //查看用户是否登入，判断是否跳转到购买页面
                    $(".buy").click(function () {

                        var pid = '{ {$ info["product_id"]}}';
                        var pid = 9378;
                        var num = $("[name='num']").val();
                        var attribute = $("[name='attribute']").val();

                        if (attribute != '' && attribute != 0) {
                            $.ajax({
                                url: '/product/login',
                                type: 'GET',
                                dataType: 'json',
                                success: function (data) {
                                    if (data.code == 1) {
                                        location.href = '/user/login';
                                    } else {
                                        $("#sku_id").val(attribute);
                                        $("#num").val(num);
                                        $("#form-post").submit();
                                    }
                                }
                            });
                        } else {
                            layer.alert('请选择正确的规格参数');
                        }
                    });

                    //关注商品
                    $("#atten").click(function () {
                        if (jud == '' || jud == '0') {
                            layer.confirm('请先登录后再关注商品，点击【确认】跳转到登录页面', {
                                title: '温馨提示',
                                btn: ['确认', '取消'] //可以无限个按钮
                            }, function (index) {
                               window.location.href = AJAX_URL + '/user/login';
                            }, function (index, layero) {
                                layer.close(index);
                            });
                            return false;

                        } else {
                            var pid = '{ {$ info["product_id"]}}';
                                var pid = 9378;
                            var token = $('input[name="_token"]').val();
                            $.ajax({
                                url: AJAX_URL + '/product/addfollow',
                                type: 'GET',
                                dataType: 'json',
                                data: {product_id: pid, _token: token},
                                success: function (data) {
                                    if (data.code == 0) {
                                        layer.alert('已关注');
                                    }
                                }

                            })

                        }
                    });
                    //关注商品结束

                    //收藏店铺
                    $(".collection_shop").click(function () {
                        if (jud == '' || jud == '0') {
                            layer.confirm('请先登录后再关注商品，点击【确认】跳转到登录页面', {
                                title: '温馨提示',
                                btn: ['确认', '取消'] //可以无限个按钮
                            }, function (index) {
                               window.location.href = AJAX_URL + '/user/login';
                            }, function (index, layero) {
                                layer.close(index);
                            });
                            return false;

                        } else {
                            var pid = '{ {$ info["product_id"]}}';
                                var pid = 9378;
                            var token = $('input[name="_token"]').val();
                            $.ajax({
                                url: AJAX_URL + '/product/addfollow',
                                type: 'GET',
                                dataType: 'json',
                                data: {product_id: pid, _token: token},
                                success: function (data) {
                                    if (data.code == 0) {
                                        $('#frm-post input,textarea').removeClass('error');
                                        $(".alert-prompt,bg-alert").show();
                                        $('.atten').html('已关注');
                                    }
                                }

                            })

                        }
                    });

                    $(".pro-price .eva-num").click(function () {
                        $("body,html").stop().animate({scrollTop: $("#infonav").offset().top - 20}, 300);
                        $(" .right-wrap .navbox li").eq(2).click();
                    });


            })


</script>
<script>
    $(function () {
        imgShow($(".pro-img .list"), $(".pro-img .imgbig"), 5, 65, "margin-left");
        $(".cent-info-main .boxs").eq(0).show();

        setTimeout(function () {
            $(".jqzoom").jqueryzoom({
                xzoom: 350, //放大图的宽度
                yzoom: 350, //放大图的高度
                offset: 10, //离原图的距离
                position: "right", //放大图的定位(默认是 "right")
                preload: 1
            });
        }, 1000);


        $("#recom-pro").slide({mainCell: ".bd > ul", autoPlay: true, effect: "leftLoop", vis: 5, interTime: 4000});

        //导航切换
        $("#infonav li").bind('click', function () {
            var n = $(this).index();
            $(".cent-info-main .boxs").eq(n).show().siblings('.boxs').hide();
            $(this).addClass('hover').siblings('li').removeClass('hover');
        });
        //联系议价员
        $('.yj .contact').click(function (event) {
            $('.i-alert-sec').show();
        });
        //导航固定
        $(window).scroll(function () {
            if ($(window).scrollTop() >= $(".right-wrap .top-wrap").offset().top - 2) {
                $(".right-wrap .navbox").addClass('fixed');
            } else {
                $(".right-wrap .navbox").removeClass('fixed');
            }
        });
        if ($(window).scrollTop() >= $(".right-wrap .top-wrap").offset().top) {
            $(".right-wrap .navbox").addClass('fixed');
        } else {
            $(".right-wrap .navbox").removeClass('fixed');
        }

        //评价加载
        var url1 = "/product/evaluate_ajax/667/0"


        //评价图片放大
        $(".right-wrap").delegate('.pic img', 'click', function () {
            var iid = parseInt($(this).attr('iid')) + 1;
            $(this).attr('iid', iid);
            if (parseInt($(this).attr('iid')) % 2 == 0) {
                $(this).parent().parent().parent().next().show()
            } else {
                $(this).parent().parent().parent().next().hide()
            }
        })


        $(".alert-prompt .close").click(function () {
            $(this).parents(".alert-prompt").hide();
            $(".bg-alert").hide();
        });


    })


    //首次刷新ajax价格变化
    $(function () {
        //var arr=get_ajax_value();
        var ccid = '667'


        //关闭弹窗
        $('.popup .close,.continue').click(function (event) {
            $('.popup').hide();
            $('.mask2').hide();
        });

        //click修改价格
        $(".click").click(function () {
            $("[name='attribute']").val(0);
            var arr = {arr: get_ajax_value()};
            var jud = 1;
            $.each(arr['arr'], function (key, value) {
                if (!value) {
                    jud = 0;
                }
            })
            if (jud) {
                $.ajax({
                    url: '/product/price_ajax',
                    data: arr,
                    type: 'get',
                    dataType: 'json'
                })
                    .done(function (data) {
                        if (!data) {
                            jud = 0;
                        }
                        if (jud) {
                            $(".s-pri").html('￥ ' + (new Number(data.price).toFixed(2)));
                            $(".sales").html('￥ ' + (new Number(data.sales).toFixed(2)));
                            if ($('#inven-num').data('promotion-num') < data.stock && $('#inven-num').data('promotion-num') != 0) {
                                $('#inven-num').html($('#inven-num').data('promotion-num'));
                            } else {
                                $('#inven-num').html(data.stock);
                            }
                            $("[name='attribute']").val(data.id);
                        } else {
                            $(".s-pri").html('所选择的属性商品不存在');
                            $(".sales").html('￥');
                            $("#inven-num").html(0);
                            $("[name='attribute']").val(0);
                        }
                    })
            }
        })
        //表格颜色
        $('.parameter-wrap table tr').each(function (index, el) {
            var index = $(this).index();
            if (index % 2 == 0) {
                $(this).css('background', '#f7f7f7');
            }
            ;
        });


    })

    //获取当前选中的商品的参数值
    function get_ajax_value() {
        var ccid = '667'
        var ob = $("#attribute .field");
        var arr = {};
        for (var i = 0; i < ob.length; i++) {
            var field = ob.eq(i).find('.stt').data('field');
            var value = ob.eq(i).find('.hover').data('id');
            arr[field] = value;
        }
        arr['ccid'] = ccid;
        return arr;
    }


    //登入
    $('#frm-post-login').on('submit', function (event) {
        url = $(this).attr('action');
        data = $(this).serializeArray();
        $.ajax({
            url: url,
            type: 'POST',
            dataType: 'json',
            data: data
        })
            .done(function (data) {
                var status;
                if (data.status == 0) {
                    $('.validate').remove();
                    $('#frm-post input,div,textarea').removeClass('error');
                    var i = 0;
                    $.each(data.msg, function (putid, putv) {
                        i++;
                        if (i == 1) {
                            put(putv)
                        }
                        $('#' + putid).removeClass('success').addClass('error');
                    });
                } else if (data.status == 1) {
                    window.location.reload();
                }
                ;


            })
    });
</script>

<script type="text/javascript">

    //加载评论
    $(document).ready(function () {
        var params = {page: 1, type: ''};
        var url = '/product/comments/9378';
        $.get(url, params, function (res) {
            $('#comment_list').html(res);
        }, 'text');
        $(document.body).on('click', '#comment_list .pagination a', function () {
            var url = $(this).attr('href');
            if (url && url != '#') {
                $.get(url, function (res) {
                    $('#comment_list').html(res);
                }, 'text');
            }
            return false;
        });
        $('input[name=type]').change(function () {
            var params = {page: 1, type: $(this).val()};
            var url = '/product/comments/9378';
            $.get(url, params, function (res) {
                $('#comment_list').html(res);
            }, 'text');
        });
    });
</script>
<script type="text/javascript">
    $(function () {
        //判断分数
        var fen = parseInt($("#totalfen").text());
        if (fen > 0 && fen <= 1) {
            $("#aquare").css("left", "32px");

        } else if (fen > 1 && fen <= 2) {
            $("#aquare").css("left", "120px");

        } else if (fen > 2 && fen <= 3) {
            $("#aquare").css("left", "210px");

        } else if (fen > 3 && fen <= 4) {
            $("#aquare").css("left", "302px");

        } else {
            $("#aquare").css("left", "390px");

        }

		var page =  1;
        $(".btn_batch").click(function(){
        	 $.ajax({
                 url: AJAX_URL + '/product/related',
                 type: 'GET',
                 dataType: 'html',
                 data: {brand_id:"11",page:++page},
                 success: function (data) {
                     if(data){
                    	 $(".related_list").html(data);
                     }else{
                         page = 1;
                     }

                 }
             })
        });
    })
</script>
<script type="text/javascript">
    $("body").on('click', '.city', function (event) {
        event.preventDefault();
        _freight();
    });

    function _freight(){
        var province_id;
        var city_id ;
        $(".province a").each(function (index, el) {
            if ($(this).attr('class')) {
                province_id = $(this).attr('data-code');
            }
        });
        $(".city a").each(function (index, el) {
            if ($(this).attr('class')) {
                city_id = $(this).attr('data-code');
            }
        });
        var num = $('#num-inp').val();
        var sku_id = "1";
        $.ajax({
            url: '/product/freight_compute',
            type: 'POST',
            dataType: 'json',
            data: {
                _token: "{{csrf_token()}}",
                province_id: province_id,
                city_id: city_id,
                num: num,
                sku_id: sku_id
            },
            success: function (data) {
                if (data.code == 0) {
                    var freight_money = parseFloat(data.data.deliver_price) + parseFloat(data.data.freight_money);
                    if(freight_money>0){
                        $(".money").text((freight_money).toFixed(2) + '元');
                    }else{
                        $(".money").text("包邮");
                    }

                    if (data.data.code == 0) {
                        $(".freight_hint").text('');
                    } else {
                        $(".freight_hint").text('(预计运费,实际运费请联系客服)');
                    }
                } else {
                    $(".money").text("包邮");
                }
            }
        });
    }
</script>
</body>
</html>